﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;
namespace IHISCETeim.BLL
{
    public  class OMarketQualificationController
    {
        public static int Add(OMarketQualificationInfo obj)
        {
            return OMarketQualificationDAL.Add(obj);
        }

        public static int AddDetail(OMarketQualificationDetailInfo obj)
        {
            return OMarketQualificationDAL.AddDetail(obj);
        }

        public static bool Update(OMarketQualificationInfo obj)
        {
            return OMarketQualificationDAL.Update(obj);
        }


        public static bool Delete(int MQID)
        {
            return OMarketQualificationDAL.Delete(MQID);
        }

        public static OMarketQualificationInfo GetByID(int MQID)
        {
            return CBO.FillObject<OMarketQualificationInfo>( OMarketQualificationDAL.GetByID(MQID));
        }

        public static IDataReader GetByItemCode(string ItemCode)
        {
            return OMarketQualificationDAL.GetByItemCode(ItemCode);
        }

        public static IDataReader GetDetailByMQID(int MQID)
        {
            return OMarketQualificationDAL.GetDetailByMQID(MQID);
        }

        public static DataTable GetPagination(string WhereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return OMarketQualificationDAL.GetPagination(WhereSql, PageIndex, PageSize, Sort, ref  TotalCount);
        }
    }
}
